//import UnServer.RecordData;
/*
* copyright by Tophy 2006 10/27
* 
* server communication Message pack
* */

class UnServer.RecordData{
	
	private var value:String;
	private var subItems:Array;
	
	/////////////////////////////////////////////////////////////
	
	public function RecordData(v:String) {
       Reset();
	   this.value=v;
    }

    private function init()
    {
        value = "";
        subItems = new Array();
    }

    public function Reset()
    {
        init();
    }
	///////////////////////////////////////////////////////////////
	
	public function SetValue(values:String){
		this.value=values;
	}
	public function AddSubItem1(vars:String){
		var dr:RecordData=new RecordData(vars);
		AddSubItem2(dr);
	}
	public function AddSubItem2(RD:RecordData){
		this.subItems.push(RD);
	}
	///////////////////////////////////////////////////////////////
	public function get SubItems():Array{
		return subItems;
	}
	public function get HasSubItem():Boolean{
		if(subItems==undefined){
			return false;
		}
		if(subItems.length>0){
			return true;
		}
		return false;
	}
	public function toString():String{
		return this.value;
	}
}